Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XM88 Spotter Variant for spotter #3733

Closed
wants to merge 11 commits into from
Closed

Conversation

Hopekz
Copy link
Contributor

@Hopekz Hopekz commented Jun 27, 2023

What is it?:
The spotter gets a single-round variant of the XM88 rifle meaning that the gun itself stores 1 round inside the magazine.
dreamseeker_vJ984pio4G


What makes this special?
This rifle can fire never before seen tracking rounds.
The rifle itself has a unremovable scope that has a 4x IFF zoom similar to the sniper.
There are only 40 rounds of tracking rounds available (1 full ammo belt)


"1 shot XM rifle? That sounds terrible!"
The point of this gun is to use the tracking bullets to spot targets for the sniper. Any target hit with the tracking bullets will be spotted for 20 seconds (may change to 15 after a TM, not 100% sure).
This is essentially a more "fun" and "involved" way for spotters to do their job for the sniper while giving them something fun to do (shooting a rifle).
One thing this allows a spotter to do versus just using their scope is marking multiple targets at once so the sniper gets to decide what they feel like shooting at. They can even mix and match their playstyle like for example shoot 1 alien with the rifle then whip out their binos to mark another target so they'd have 2 targets marked using 2 different methods.

The regular XM88 can't hold these new tracker rounds and if they can through some means that I haven't discovered then it is a bug.


"Is it overpowered!?"

Here is what needs to happen after the rifle is fired:
1: You need to free up a hand to grab another bullet
2: Grabbing a bullet causes you to hold the gun in 1 hand, this causes the gun to unscope
3: Put the bullet in the gun
4: Chamber the round (can do after step 6)
5: hold the rifle in both hands again
6: Scope in the rifle again

In practice I think I have created a solution for this that is fairly balanced but a TM will verify it.


Flavortext lore description:

The distinctiveness of the S6 Solo Scope's fit to the XM88 Scout Rifle springs from the deep-rooted secrets of ARMAT's engineering. The XM88, under its metallic skin, hides an exclusive, proprietary optics mount, a feat of craftsmanship from ARMAT. This bespoke design meshes flawlessly with the Solo Scope, creating a harmonious union that is the mark of an expert rifleman. Upon first glance, you might think it's just a unique mount, but it's more than that. The optics mount is engineered with an advanced mechanical lock-in mechanism, fortified with a responsive electronic interlink. When the S6 Solo Scope is placed onto the XM88, the lock-in mechanism secures the scope firmly, ensuring zero shift during recoil. Then, the electronic interlink takes over - the microprocessors within the XM88 and the Solo Scope commence a rapid series of high-speed data transfers, fine-tuning the scope's range settings to match the current atmospheric conditions, as detected by the XM88's internal barometric and temperature sensors.

This ingenious pairing of mechanical design and electronic interfacing enables the rifleman to unlock the full lethal precision the XM88 offers. And it's in this masterful interplay between steel and silicon, the convergence of mechanics and electronics, that the XM88 and the S6 Solo Scope truly become a force to be reckoned with in the right hands.

The sophisticated technology underlying the Solo Scope's functionality is best matched to a single-shot rifle like the XM88, and there's a crucial reason for that. Automatic or semi-automatic rifles may seem more powerful due to their rapid-fire capabilities, but this often comes with an unavoidable trade-off: accuracy. With each successive shot, recoil accumulates, leading to a shift in the rifle's position which can throw off the aim considerably, rendering even the best scopes less effective.

However, the XM88's single-shot mechanism sidesteps this issue elegantly. After each shot, the shooter manually reloads, which provides a moment for the rifle to return to its original position, minimizing the impact of recoil on aim.

Further, the Solo Scope is integrated with a Recoil Compensation System (RCS). This sophisticated feature uses high-speed gyroscopes to detect the minute shifts from the rifle's recoil. The RCS then rapidly calculates and adjusts the scope's reticle, compensating for the minute change in angle. Yet, such a system requires a brief moment to reset and recalibrate after each shot, a time luxury that isn't available in rapid-fire firearms.

The XM88, with its single-shot operation, offers just enough pause for the RCS to perform its recalibration, ensuring maximum accuracy for the next shot. This perfect harmony between the rifle and scope, built on the back of ARMAT's precision engineering, makes the XM88 and the S6 Solo Scope an unmatched combination in terms of accuracy and precision.
"

🆑 Hopek
add: Added the XM88 Spotter Variant for spotter. This gun fires new tracking bullets that spots individuals similar to using the spotting binoculars.
/:cl:

@github-actions github-actions bot added the Feature Feature coder badge label Jun 27, 2023
@github-actions
Copy link
Contributor

You currently have a negative Fix/Feature pull request delta of -19. Maintainers may close this PR at will. Fixing issues or improving the codebase will improve this score.

icon_state = "redbullet"
damage = 70
penetration = ARMOR_PENETRATION_TIER_3
accuracy = HIT_ACCURACY_TIER_1
handful_state = "tracking_lever_action_bullet"

/datum/ammo/bullet/lever_action/tracker/proc/tracker_remove(mob/M, icon)
REMOVE_TRAIT(M, TRAIT_SPOTTER_LAZED, TRAIT_SOURCE_EQUIPMENT(2000))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's 2000 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the CAS tracker for the bullet.

The way I see it I had 4 solutions for CAS ID for this PR:
1: Give every single bullet a CAS ID round-start which would increment the CAS ID number by +40
2: Give a incremented CAS ID every time a tracking bullet fires
3: Set the CAS ID to some really high number that I don't think can be reached in-game like 2000
4: Rework the gun systems to support having a CAS ID linked to the gun itself for my one-off item.

I chose number 3 so I set the CAS ID to 2000 because I don't think we'll ever get to 2000 laser binos and rangefinders on the map.

src.color = "#FFCC00" // Yes recoloring things is the new coder sprites what about it

// This si the box that comes in the spotter kit
/obj/item/ammo_magazine/internal/lever_action/xm88/spotter/box
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use internal magazines for this, these are meant for internal firearms usage (holding rounds as a revolver barrel or shotgun tube, etc) and not as usable items

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny enough the reason that I put that in there is intentional if I remove the internal it causes the box to spawn fine but the rounds inside the box will be the SOCOM rounds not the tracer rounds.

Maybe some kind of bug with how the parents over-write ammo box contents but the way I solved this was to change the parent before we get to lever_action and "internal" works for my needs.

dreamseeker_7hcTAkPHf7

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See /obj/item/ammo_magazine/lever_action/tracker. If you inherit /obj/item/ammo_magazine/lever_action/xm88 then of course its going to contain /datum/ammo/bullet/lever_action/xm88 unless you alter default_ammo


/obj/item/ammo_magazine/internal/lever_action/xm88/spotter/Initialize(mapload, spawn_empty)
. = ..()
src.color = "#FFCC00" // Yes recoloring things is the new coder sprites what about it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one shouldn't be visible so why change the color?

Copy link
Contributor Author

@Hopekz Hopekz Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a way to recolor the child one step below. I can change this if really needed and I don't see this making any impact.

code/modules/projectiles/ammo_datums.dm Outdated Show resolved Hide resolved
@fira
Copy link
Member

fira commented Jun 27, 2023

As an extra observation, i'm not sure 40 bullets is actually that much if it's non refillable, but that's more for balance people to figure out

@Hopekz
Copy link
Contributor Author

Hopekz commented Jun 27, 2023

As an extra observation, i'm not sure 40 bullets is actually that much if it's non refillable, but that's more for balance people to figure out

I had no idea how to test that part for balance alone so I only set it to 40 because that is what the standard ammo belt holds.

The way I figure that 40 may be a good number is because this is a gun and people miss guns but you're right in practice maybe 40 will need to change.

code/modules/projectiles/ammo_datums.dm Outdated Show resolved Hide resolved
code/modules/projectiles/gun_attachables.dm Outdated Show resolved Hide resolved
code/modules/projectiles/guns/lever_action.dm Outdated Show resolved Hide resolved
code/modules/projectiles/guns/lever_action.dm Outdated Show resolved Hide resolved
code/modules/projectiles/magazines/lever_action.dm Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale beg a maintainer to review your PR label Jul 14, 2023
Copy link
Member

@morrowwolf morrowwolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Willing to TM but this is going to need some changes.

40 rounds isn't anything in a long round. Likely need a way to reload of some sort.

And do what Fira asked

//SEND_SIGNAL(user, COMSIG_BULLET_TRACKING, user, M)
M.visible_message(SPAN_DANGER("You hear a faint beep under [M]'s [M.mob_size > MOB_SIZE_HUMAN ? "chitin" : "skin"]."))
/datum/ammo/bullet/lever_action/tracker/proc/tracker_remove(mob/target, icon)
REMOVE_TRAIT(target, TRAIT_SPOTTER_LAZED, TRAIT_SOURCE_EQUIPMENT(2000))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mirror'ing what Fira said, having this just set at 2000 looks hyper cursed.

@morrowwolf morrowwolf marked this pull request as draft July 19, 2023 05:43
@Hopekz
Copy link
Contributor Author

Hopekz commented Jul 22, 2023

Might reopen this in the future when CM dev picks back up closer to how it was when I started. (turnaround back to 3-4 days)

Personally for me it is a bit mentally exhausting at the moment to be open to modify something for a month so assuming I haven't moved on to another project I'll reopen this when I come back to CM dev.

Probably wouldn't be as bad if the last 5+ of my PR's here haven't been just reviewed out to change the spelling of some variable or proc or how I write out words like me typing out T instead of turf. Waiting past the usual turnaround I'm used to just to be told that is discouraging.

Even in this specific PR what seems to be blocking a TM is a number looking weird at 2000 so I'd have to try to make it look more pretty just to see if people like the idea of the feature for a TM in probably another week or two after I modify the PR.

@Hopekz Hopekz closed this Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature coder badge Stale beg a maintainer to review your PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants